import React from 'react'
import { Grid } from 'antd-mobile';
import i0 from '../../../../static/img/homeIcon/i0.png';
import i1 from '../../../../static/img/homeIcon/i1.png';
import i2 from '../../../../static/img/homeIcon/i2.png';
import styled from "styled-components";
const Wrap = styled.div`
  background-color:#fff;
  .slider-frame{
    min-height:170px!important
  }
  @media screen and (max-width: 330px) {
    .slider-frame{
    min-height:140px!important
  }
}
`;
function Swiper(props) {
  let menuArr = [
    {
      icon: i0,
      text: `订单`,
      url: "/shoporder"
    },
    {
      icon: i1,
      text: `分类`,
      url: "/shopCates"
    }, {
      icon: i2,
      text: `购物车`,
      url: "/shoppingCart"
    }, {
      icon: i0,
      text: `地址管理`,
      url: "/address"
    }, {
      icon: i1,
      text: `新闻`,
      url: "/newsList"
    }, {
      icon: i2,
      text: `小说`,
      url: "/novel"
    }, {
      icon: i1,
      text: `新闻`,
      url: "/newsList"
    }, {
      icon: i2,
      text: `小说`,
      url: "/novel"
    }, {
      icon: i1,
      text: `新闻`,
      url: "/newsList"
    }, {
      icon: i2,
      text: `小说`,
      url: "/novel"
    }
    ,
    {
      icon: i0,
      text: `购物2`,
      url: "/shopHome"
    }, {
      icon: i1,
      text: `新闻`,
      url: "/newsList"
    }, {
      icon: i2,
      text: `小说`,
      url: "/novel"
    }
  ]
  return (
    <Wrap>
      <Grid
        // style={{ height: "150px" }}
        isCarousel={true}
        data={menuArr}
        columnNum={5}
        hasLine={false}
        onClick={(i) => {
          props.history.push(i.url)
        }}
      />
    </Wrap>
  );
}
export default Swiper
